#include <reg52.h>

sbit zuo=P2^4;
sbit beep=P3^7;

void main()
{
	while(1)
	{
		if(zuo==1)
			beep=0;
		else
			beep=1;
	}
}